package model.Actions;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import view.ViewFunctions;
import DB.Connection.DBConnectionManager;

import commons.Entities.LegenCharacter;

public class getCharacterDetailsAction implements Runnable {

	private static final Log logger = LogFactory.getLog(getCharacterDetailsAction.class);

	private Integer characterID;

	public getCharacterDetailsAction(Integer characterID) {
		this.characterID = characterID;
	}

	@Override
	public void run() {
		logger.info("getCharacterDetailsAction starting...");

		LegenCharacter character = DBConnectionManager.get().getCharacterByID(characterID);
		ViewFunctions.get().updateGUICharacterDetails(character);

		logger.info("getCharacterDetailsAction ended.");
	}
}
